<template>
  <view :class="_getClass()">
    <slot></slot>
  </view>
</template>

<script>
export default {
  name: "YRow",
  props: {
    isMatchWidth: {type: Boolean, default: false},
    isMatchHeight: {type: Boolean, default: false},
    isVerticalCenter: {type: Boolean, default: false},
    isHorizontalCenter: {type: Boolean, default: false},
    isExpanded: {type: Boolean, default: false},
  },
  methods: {
    _getClass() {
      let result = "";
      if (this.isVerticalCenter) result += "yContainerRowCenter_v ";
      if (this.isHorizontalCenter) result += "yContainerRowCenter_h ";
      if (this.isVerticalCenter && this.isHorizontalCenter) result += "yContainerRowCenter ";
      if (!this.isVerticalCenter && !this.isHorizontalCenter) result += "yContainerRow ";
      if (this.isMatchWidth) result += "yMatch_w ";
      if (this.isMatchHeight) result += "yMatch_h ";
      if (this.isMatchHeight && this.isMatchHeight) result += "yMatch ";
      if (this.isExpanded) result += "yWeight ";
      return result;
    },
  },
}
</script>

<style scoped>

</style>